<template>
  <div class="diadiv ">
    <div class="diadiv-inner animated fast" :class="showflag?'fadeInUpBig ':'fadeOutDown'">
      <div class="title">
        <div class="title-center">
          <slot name="title" />
        </div>
      </div>

      <div class="body">
        <i class="el-icon-error close" @click="onclick" />
        <slot name="body" class="body-inner"/>
      </div>
      <div class="footer">
        <slot name="footer" />
      </div>
    </div>
    <div v-if="showflag && ismask" class="mask" />
  </div>
</template>

<script>
export default {
    name: 'DlgdivTip',
    props: {
        mask: {
            type: Boolean,
            default: false
        },
        ismask:{
            type: Boolean
        },
    },
     data() {
        return {
            showflag: true
        }
    },
     created() {
       
    },
    methods: {
        onclick() {
            this.showflag = false;
            this.$parent.closeTipDialog()
          
        }
    }
}
</script>

<style lang="scss" scoped>
.diadiv {
  position: absolute;
  top: 40%;
  left: 35%;
  width: 460px;
  height: 180px;
  // padding: 20px 40px;
  z-index: 999;


  .diadiv-inner {
    width: 100%;
    height: 100%;
    position: relative;
     &::before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      z-index: -1;
      // border: 1px solid #0449aa;
      background: url('../../assets/dialog/tipDialog.png') no-repeat;
      background-size: 100% 100%;
      // box-shadow: 0 0 0 1px #2e4378, inset 0 0 15px #31467d;
    }

    &::after {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
    
      z-index: -1;
    }
  }

  .close {
    position: absolute;
    // right: 5px;
    // top: 5px;
    right:15px;
    top:10px;
    font-size: 20px;
    color: transparent;
    cursor: pointer;
    z-index:5;
    background: url("~@/assets/dialog/dialogClose.png") no-repeat center ;
    background-size: 101% 100%;
  }

  .title {
    width: 100%;
    //height: 60px;
    //line-height: 50px;
    //background: url("~@/assets/dialog/dialogTitle.png") no-repeat center right;
    //background-size: 101% 100%;
    height: 45px;
    line-height: 40px;
    font-size: 18px;
    font-family: Source Han Sans CN;
    font-weight: bold;
    color: #FFFFFF;
    
    .title-center {
      letter-spacing: 2px;
      text-indent: 26px;
    }

    // .title-center::after {
    //   content: "";
    //   position: absolute;
    //   width: 100%;
    //   height: 100%;
    //   top: -8px;
    //   left: 0;
    //   background-image: url("../../assets/img/comTabBg.png");
    //   background-size: 100% 100%;
    // }
  }

  .body {
    width: 100%;
    height: 86px;
    //height: 100%;
    box-sizing: border-box;
    padding: 2% 4%;
    font-size: 14px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #FFFFFF;
    opacity: 0.8;
    text-shadow: 0px 3px 2px rgba(0,14,17,0.19);
    display: flex;
    justify-content: center;
  }

  .mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    // background-color: rgba(11, 49, 85, 0.33);
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    z-index: -2;
  }
}

.footer{
  
  .btn-row{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content:space-around;
    
    .btn{
      img{
        width: 204px;
      }
      
    }
  }
  
}
</style>
